package com.xiumu.common.core.page;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

/**
 * 分页查询
 *
 * @Author XiuMu
 * @Date 2023/1/28 14:52
 **/
@Data
public class PageQuery<Q, T> {

    /**
     * 当前页
     */
    protected long current = 1;

    /**
     * 每页显示条数，默认 10
     */
    protected long size = 10;

    /**
     * 查询条件
     */
    private Q condition;

    public Page<T> toPage() {
        return new Page<T>(current, size);
    }
}